/**
 * @Author: 九璃怀特 1599130621@qq.com
 * @Date: 2022-10-26 14:29:41
 * @LastEditors: 九璃怀特 1599130621@qq.com
 * @LastEditTime: 2022-10-26 14:33:16
 * @FilePath: \nonogram\v.ts
 * @Description:
 */
interface DomToImage {
  toSvg(node: Node, options?: Options): Promise<string>;
  toPng(node: Node, options?: Options): Promise<string>;
  toJpeg(node: Node, options?: Options): Promise<string>;
  toBlob(node: Node, options?: Options): Promise<Blob>;
  toPixelData(node: Node, options?: Options): Promise<Uint8ClampedArray>;
}

interface Options {
  filter?: ((node: Node) => boolean) | undefined;
  bgcolor?: string | undefined;
  width?: number | undefined;
  height?: number | undefined;
  style?: {} | undefined;
  quality?: number | undefined;
  imagePlaceholder?: string | undefined;
  cacheBust?: boolean | undefined;
}

type DomToImage_ = DomToImage;
type Options_ = Options;

declare global {
  namespace DomToImage {
    type Options = Options_;
    type DomToImage = DomToImage_;
  }

  const DomToImage: DomToImage.DomToImage;
}
export default DomToImage;
